Re: [SQL] parts of date_part() - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] parts of date_part()
Date
Msg-id l03110704b2097cbdee1a@[147.233.159.109]
Whole thread Raw
In response to parts of date_part()  (Eric McKeown <ericm@palaver.net>)
Responses Re: [SQL] parts of date_part()
List pgsql-sql
At 2:33 +0300 on 25/8/98, Eric McKeown wrote:


>
> Well, I've done some digging in the FAQ, the user documentation, and the
> man pages, so I hope nobody screams 'RTFM' on this question, but I suppose
> you're welcome to if it was somewhere obvious and I missed it.
>
> I'm looking for a complete list of the different "date parts" that I can
> use to extract information about a given datetime value in a table.

Actually, it is an RTFM...

From the manpage of pgbuiltin (my postgres version is 6.2.1):

     For the date_part() and  date_trunc()  functions,  arguments
     can   be  `year',  `month',  `day',  `hour',  `minute',  and
     `second',  as  well  as  the  more  specialized   quantities
     `decade',   `century',   `millenium',   `millisecond',   and
     `microsecond'.  date_part() allows `dow' to  return  day  of
     week  and  `epoch' to return seconds since 1970 for datetime
     and 'epoch' to return total elapsed seconds for timespan.

So...

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] copying rows
Next
From: David Hartwig
Date:
Subject: Re: [SQL] excel vs. money data type?